package com.web.utils;

import java.util.Random;

/**
 * @Description:
 * @author:cwk
 * @create: 2017-08-17 17:09
 */
public class MathUtil {
    /**
     *
     * @Description: 产生随机的六位数
     * @param @return
     * @return String
     */
    public static String getSix(){
        Random rad=new Random();
        String result  = 100000+rad.nextInt(899999) +"";

        return result;
    }

    /**
     *
     * @Description: 获得区间随机数
     * @param @param max
     * @param @return
     */
    public static Integer getRandomNum(int min,int  max){
        int Min = min;
        int Max = max;
        int result = Min + (int)(Math.random() * ((Max - Min) + 1));
        return result;
    }
}
